package other.nowcoder.easy;

import java.util.Scanner;

/**
 * @author bruin_du
 * @description 因式分解
 * https://www.nowcoder.com/questionTerminal/0f6976af36324f8bab1ea61e9e826ef5
 * @date 2022/5/30 22:02
 **/
public class Factorization {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNextInt()){
            int n = in.nextInt();
            StringBuilder sb = new StringBuilder();
            sb.append(n).append(" = ");
            for (int i = 2; i <= (int)Math.sqrt(n); i++) {
                while(n % i == 0){
                    sb.append(i).append(" * ");
                    n /= i;
                }
            }
            if(n != 1) sb.append(n).append(" * ");
            sb.setLength(sb.length() - 3);
            System.out.println(sb.toString());
        }
    }
}
